package net.xin.servlet.imple;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import net.xin.dao.AlbumDAO;
import net.xin.model.Album;
import net.xin.servlet.AlbumServlet;

@Component(value="albumServlet")
public class AlbumServletImple implements AlbumServlet {
	
	AlbumDAO albumDAO;
	
	public AlbumDAO getAlbumDAO() {
		return albumDAO;
	}

	@Resource
	public void setAlbumDAO(AlbumDAO albumDAO) {
		this.albumDAO = albumDAO;
	}


	public void add(Album album) {
		albumDAO.save(album);
	}
}
